/**
 * @file
 * @author Filipe Mutz
 *
 * @section DESCRIPTION
 *
 */

#ifndef VG_RAM_NEURON_LAYER_H_
#define VG_RAM_NEURON_LAYER_H_

namespace brain
{
	namespace neuron_layer
	{
		template<class OutputClass>
		class VGRAMNeuronLayer
		{
			int ***_patterns; // [neuron] [memory] [bit_pattern]
			OutputClass **_classes; // [neuron] [memory]
			int _num_samples, _height, _width;

			public:

				VGRAMNeuronLayer(int width, int height);
				~VGRAMNeuronLayer();

				void train(int ***pattern, OutputClass **class_id);
				void train(int ****pattern_array, OutputClass ***class_array, int num_samples);
				void train(int neuron_x, int neuron_y, int *pattern, OutputClass class_id);
				void train(int neuron_x, int neuron_y, int **pattern_array, OutputClass *class_array, int num_samples);

				OutputClass test(int ***pattern);
				OutputClass* test(int ****pattern_array, int num_samples);
				OutputClass test(int neuron_x, int neuron_y, int *pattern);
				OutputClass* test(int neuron_x, int neuron_y, int **pattern, int num_samples);

				void save_train_data(char *output_file);
				void load_train_data(char *input_file);
		};
	}
}

#endif
